using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BlogEngine.Core;

public partial class site : System.Web.UI.MasterPage
{
  protected void Page_Load(object sender, EventArgs e)
  {
  }

  protected string getThemeUrl()
  {
      string _Theme = BlogSettings.Instance.Theme;

      if (Request.QueryString["theme"] != null)
          _Theme = Request.QueryString["theme"];

      return Utils.RelativeWebRoot + "themes/" + _Theme + "/";  
  }
  
    protected override void OnPreRender(EventArgs e)
  {
      base.OnPreRender(e);


      if (!Page.ClientScript.IsClientScriptBlockRegistered("dilectio.js"))
      {
          
          string currentUrl = getThemeUrl();

          Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "dilectio.js", @"<script type=""text/javascript"" src='" + currentUrl + @"tabs.js'></script>", false);
          Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "dilectio-imghover.js", @"<script type=""text/javascript"" src='" + currentUrl + @"imghover.js'></script>", false);

      }
  }

}
